Add error message to style reader when missing comma after token.
authorrobertl <robertl>
Tue, 14 Oct 2008 15:52:52 +0000 (15:52 +0000)
committerrobertl <robertl>
Tue, 14 Oct 2008 15:52:52 +0000 (15:52 +0000)
csv_util.c

index 200db154e9d6be8cc23698a022729ef7503b6856..45b22b9b404106474f043151a9fe92cd9efe5e44 100644 (file)
@@ -929,6 +929,10 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp)
     char *enclosure = "";
     geocache_data *gc_data = NULL;
 
+    if (!fmp->printfc) {
+      fatal(MYNAME ": xcsv style '%s' is missing format specifier", fmp->key);
+    }
+
     if (0 == strcmp(fmp->printfc, "\"%s\"")) {
        enclosure = "\"";
     }